from django.db import models

# Create your models here.

class HostInfo(models.Model):
    hostName = models.CharField(verbose_name='主机信息',max_length=100)
    HostIp = models.GenericIPAddressField(verbose_name='IP地址')
    enable = models.BooleanField(verbose_name='Enable/Disable',default='True')




    class Meta:
        verbose_name = "主机信息"
        verbose_name_plural = "主机信息"

    def __str__(self):
        return self.hostName


class cfgFile(models.Model):
    cfgName = models.CharField(verbose_name='cfgName',max_length=500)
    cfgFile = models.FileField(upload_to="yamlfilename/%Y%m%d/",verbose_name='输入上传文件YAML文件')
    enable = models.BooleanField(verbose_name='Enable/Disable',default='True')

    class Meta:
        verbose_name = "配置文件信息"
        verbose_name_plural = "配置文件信息"

    def __str__(self):
        return self.cfgName
